package com.mt.pojo;

import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author Wang
 * @Description 权限控制实体类
 * @since 2020-11-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("mt_acl")
@ApiModel(value="Acl对象", description="")
public class Acl implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增id")
    @TableId(value="id", type= IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "权限标识")
    private String aclCode;

    @ApiModelProperty(value = "权限名称")
    private String aclName;

    @ApiModelProperty(value = "父节点id")
    private Integer parentId;

    @ApiModelProperty(value = "请求路径")
    private String url;

    @ApiModelProperty(value = "排序字段")
    private Integer sort;

    @ApiModelProperty(value = "请求头类型")
    private String requestType;

    @ApiModelProperty(value = "目录,菜单,按钮 /0,1,2")
    private Integer type;

    @ApiModelProperty(value = "上次操作时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist=false)
    private List<Acl> children= CollUtil.newArrayList();


}
